﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ConsoleApp5
{
    class area
    {
        public string Name { get; set; }
        public int RectangleArea { get; set; }
        public int CircleArea { get; set; }

        public double CircleArea1(int r)
        {
            return r * r * 3.14;
        }

        public double RectangleArea1(int Long, int Width)
        {
            return Long * Width;
        }
        public void Area()
        {
            Console.WriteLine("圆的面积是{0}，长方形的面积是{1}", this.CircleArea, this.RectangleArea);
        }
        public area(string name)
        {
            this.Name = name;
        }
    }
}
//3.定义一个计算图形面积的类，类中定义计算面积的方法：分别计算圆面积和长方形面积两个方法。